package cn.wolfcode.car.business.service;

import cn.wolfcode.car.business.domain.BpmnInfo;
import cn.wolfcode.car.business.qo.BpmnInfoQueryObject;
import cn.wolfcode.car.common.base.page.TablePageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 岗位服务接口
 */
public interface IBpmnInfoService {

    /**
     * 分页
     * @param qo
     * @return
     */
    TablePageInfo<BpmnInfo> query(BpmnInfoQueryObject qo);

    /**
     *  上传部署文件
     * @param file
     * @return
     */
    String upload(MultipartFile file) throws IOException;

    /**
     *  部署流程定义
     * @param path
     * @param info
     * @param bpmnType
     * @throws IOException
     */
    void deploy(String path, String info, String bpmnType) throws IOException;

    /**
     *  删除流程定义
     * @param id
     */
    Integer delete(Long id);

    /**
     *  读取部署文件
     * @param deploymentId
     * @param type
     * @param resp
     */
    void readResource(String deploymentId, String type, HttpServletResponse resp) throws IOException;

    /**
     *
     * @param type
     * @return
     */
    List<BpmnInfo> getByBpmnType(String type);
}
